package net.rlair.sbdemo.aspect;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @author:
 * @description:
 * @create:2019-03-15 13:29
 */
@Component
@Aspect
@Order(2)
public class GuanboAspect1 {

    @Pointcut("execution(* net.rlair.sbdemo.controller.ZhaozichenController.list(..))")
    public void guanboAspects() {
    }

    @Before("guanboAspects()")
    public void before() {
        System.out.println("GuanboAspects1 before ......");
    }

    @After("guanboAspects()")
    public void after() {
        System.out.println("GuanboAspects1 after ......");
    }

    @AfterThrowing("guanboAspects()")
    public void afterThrowing() {
        System.out.println("GuanboAspects1 afterThrowing ......");
    }
}
